﻿<phone:PhoneApplicationPage 
    x:Class="OttawaTourMap.TourDetailsPanoramicView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="728"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" >
        <controls:Panorama Name="TourDetailPanorama" Title="{Binding Path=Localizedresources.Tour_Details, Source={StaticResource LocalizedStrings}}">
        	<controls:Panorama.Background>
        		<LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
        			<GradientStop Color="#FF06151D" Offset="0.181"/>
        			<GradientStop Color="#FF09164B" Offset="1"/>
        		</LinearGradientBrush>
        	</controls:Panorama.Background>

            <!--Panorama item one-->
            <controls:PanoramaItem Name="Stops_Item" Header="{Binding Path=Localizedresources.Stops, Source={StaticResource LocalizedStrings}}">
                <Grid x:Name="TourDetailsGrid" Grid.Row="1" Margin="12,0,12,8" DataContext="{Binding}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <ListBox Name="StopListBox" ItemsSource="{Binding TourDetails}" Grid.Row="1" 
                             d:LayoutOverrides="GridBox" Margin="0,0,8,8" SelectionChanged="ListBox_SelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Height="199" Margin="0,4,0,0" Orientation="Horizontal" VerticalAlignment="Top">
                                    <Image Margin="5,10,0,10" Width="156" Source="{Binding TourStopImageURI}"/>
                                    <StackPanel Margin="10,8,5,8" Orientation="Vertical" Width="296">
                                        <TextBlock TextWrapping="Wrap" Height="122" Text="{Binding TourStopTitle}" RenderTransformOrigin="0.483,0.75" Margin="10,10,62,0"/>
                                        <TextBlock TextWrapping="Wrap" Height="35" Foreground="#FF096806" Text="{Binding TourStopDuration}" Margin="10,0,62,0" RenderTransformOrigin="0.513,1.886"/>
                                    </StackPanel>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    

                </Grid>
            </controls:PanoramaItem>

            <!--Panorama item two-->
            <controls:PanoramaItem Name="Description_Item" Header="{Binding Path=Localizedresources.Description, Source={StaticResource LocalizedStrings}}">
                <Grid>
                	<ScrollViewer Margin="8">
                        <TextBlock Name="TourDescriptionTextBlock" TextWrapping="Wrap" RenderTransformOrigin="0.347,0.303" Margin="0,0,404,0" Width="396" Height="474"/>
                	</ScrollViewer>
                </Grid>
            </controls:PanoramaItem>
            <controls:PanoramaItem Header="Pictures">
                <Grid Name="picturesGrid" DataContext="{Binding}">
            		<ListBox x:Name="PicturesListBox" ItemsSource="{Binding ImageCollection}">
            			<ListBox.ItemTemplate>
            				<DataTemplate>
            					<StackPanel Orientation="Vertical" Width="412" Margin="0,0,0,10">
                                    <TextBlock Text="{Binding ImageTitle}" Height="32" Margin="8,0" TextWrapping="Wrap" Foreground="#FF03410F"/>
            						<Image Source="{Binding ImageUri}" Height="378"/>
            					</StackPanel>
            				</DataTemplate>
            			</ListBox.ItemTemplate>
            		</ListBox>
            	</Grid>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>

    <!--Panorama-based applications should not show an ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" BackgroundColor="{StaticResource PhoneSemitransparentColor}" >
            <!--shell:ApplicationBarIconButton Click="ApplicationBarIconButton_Click_Back" IconUri="/icons/back.png" Text="Tour List"/-->
            <shell:ApplicationBarIconButton IconUri="/icons/Location.png"  Click="ApplicationBarIconButton_Click" Text="start tour"/>

        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>